<div id="uni_middle">
    <div class="detail_product">
        <div class="box_pro_detail">
            <div class="product_detail">
            	<?php if(!empty($post['fields']['slides'])): ?>                
                <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">                      
                  <div class="carousel-inner">
                  	<?php $arrImages = explode(';', $post['fields']['slides']); ?>
                  	<?php foreach($arrImages as $i=>$img): ?>
                    <div class="item <?php if($i == 0): ?>active<?php endif;?>">
						<img alt="First slide" src="<?php echo UPLOADS_URL.'/'.$img; ?>" />
                    </div>
                    <?php endforeach; ?>                    
                  </div>
                  <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
                    <span class="ico_all ico_prev"><em></em></span>
                  </a>
                  <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">    
                    <span class="ico_all ico_next"><em></em></span>
                  </a>          
                </div>
                <?php endif; ?>
                <h3 class="title_intro"><?php echo $post['post_title']; ?></h3>
                <div class="content_intro"><?php echo $post['post_body']; ?></div>
                <a href="#" class="btn_blueWhite pull-left">Sưu tầm</a>
            </div>
            <?php if(isset($post['fields']['address'])): ?>
            <div class="map_view">
            	<iframe width="100%" height="310" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=<?php echo urlencode($post['fields']['address']); ?>&amp;aq=0&amp;oq=200+p&amp;sll=37.0625,-95.677068&amp;sspn=39.592876,86.572266&amp;ie=UTF8&amp;hq=&amp;hnear=200+Pasteur,+ph%C6%B0%E1%BB%9Dng+6,+Qu%E1%BA%ADn+3,+H%E1%BB%93+Ch%C3%AD+Minh,+Vietnam&amp;t=m&amp;z=14&amp;ll=10.784705,106.691213&amp;output=embed"></iframe>
            </div>
            <?php endif; ?>     
            <ul class="box_comment">
                <?php if(!empty($arrComments)): ?>
                <?php foreach($arrComments as $R): ?>
                <li>
                    <div class="avatar"><img src="images/img_ava_46x46.jpg" /></div>
                    <div class="comment_content">
                        <div class="title_comment">
                            Webdding Chick <span class="time_his">- 6 hours ago</span>
                        </div>
                        <div class="content_comm_show">
                            <?php echo $R['comment_body']; ?>
                        </div>                          
                    </div>
                </li>
                <?php endforeach; ?>                    
                <?php endif; ?>
                <?php if(!Yii::app()->user->isGuest): ?>
                <li>
                    <form id="frmComment" method="post" action="/ajax/comment">
                    <div class="avatar"><img src="images/img_ava_46x46.jpg" /></div>
                    <div class="comment_content">
                        <div class="title_comment">
                            Webdding Chick <span class="time_his">That's you</span>
                        </div>
                    </div>
                    <div class="content_comm_show">
                        <textarea name="comment" class="required" cols="10" rows="2"></textarea>
                        <input type="hidden" name="post" value="<?php echo $post['post_id']; ?>">
                        <div class="flo_left clear width_100Pec mTop8">
                            <input type="reset" class="btn_gray flo_right mLeft_10" />
                            <input type="submit" class="btn_gray flo_right" value="Submit">                                   	
                        </div>
                    </div>  
                    </form>
                </li>
                <?php else: ?>
                <li> Vui lòng đăng nhập để bình luận! </li>
                <?php endif; ?>
            </ul>
        </div>
        <div id="sidebar">
            <div class="sidebar">            	
                <h3 class="colo_d43163">Thông tin</h3>
                <div class="col-md-12 col-sm-8 col-xs-12">
                    <p><b><?php echo isset($post['fields']['address'])?$post['fields']['address']:'';?></b></p>
                    <p>Điện thoại: <?php echo isset($post['fields']['phone'])?$post['fields']['phone']:'';?></p>
                    <p>Fax: </p>
                    <p>Email: </p>
                    <p><?php echo isset($post['fields']['website'])?$post['fields']['website']:'';?></p>
                </div>
                <div class="col-md-12 col-sm-4 col-xs-12">
                    <div class="clock" id="defaultCountdown"></div>
                    <div class="box_tk">Tiết kiệm: <span><?php echo isset($post['fields']['discount'])?$post['fields']['discount']:''; ?><sup>%</sup></span></div>
                </div>
                
                <?php if(!empty($arrMyPosts)): ?>
                <h3 class="colo_1f6e80 width_100Percent">Các deal hiện có</h3>
                <div class="list_pro">
                	<?php foreach($arrMyPosts as $R): ?>
                    <?php
						$R['fields']['slides'] = !empty($R['fields']['slides'])?$R['fields']['slides']:null; 
						$arrImages = explode(';', $R['fields']['slides']); 
					?>
                    <a href="/deals/<?php echo Utils::uri_encode($R['post_title']); ?>.<?php echo $R['post_id']; ?>.html"><img width="60px" height="60px" src="<?php echo UPLOADS_URL.'/'.$arrImages[0]; ?>" /></a>
                    <?php endforeach; ?>
                </div>
                <?php endif; ?>
            </div>
            <div class="sidebar">
                <div class="box_vote">
                    <span class="ico_all icon_eyesCus"><em></em></span><label>Little chef</label>                
                </div>
                <div class="user_dg">
                    <span>Đánh giá thành viên</span>
                    <span class="like_unlike">
                        <a href="javascript:;" class="ico_all icon_like"><em></em></a>
                        <a href="javascript:;" class="ico_all icon_like"><em></em></a>
                        <a href="javascript:;" class="ico_all icon_like"><em></em></a>
                        <a href="javascript:;" class="ico_all icon_like"><em></em></a>
                        <a href="javascript:;" class="ico_all icon_unLike"><em></em></a>
                    </span>
                </div>
                <div class="list_pro">
                    <a href="#"><img src="images/img_1_95x95.jpg" /></a>
                    <a href="#"><img src="images/img_2_95x95.jpg" /></a>
                    <a href="#"><img src="images/img_3_95x95.jpg" /></a>
                    <a href="#"><img src="images/img_4_95x95.jpg" /></a>
                    <a href="#"><img src="images/img_5_95x95.jpg" /></a>
                    <a href="#"><img src="images/img_6_95x95.jpg" /></a>
                </div>
            </div>
        </div>
        <div class="deal_same">Các deal tương tự</div>        
        <div class="box_product">
            <div class="each_pro">
                <div class="product_info">
                    <a href="#" class="img_pro"><img src="images/img_pro_1.jpg" /></a>                
                    <div class="user_action">
                        <div class="choossed">
                            <a href="#" class="ico_all ico_people"><em></em></a>
                            <p class="count_number">500</p>
                            <p class="txt">Đã chọn</p>
                        </div>
                        <div class="share">
                            <a href="#" class="ico_all ico_share"><em></em></a>
                            <p class="count_number">500</p>
                            <p class="txt">Đã chọn</p>
                        </div>
                        <a href="#" class="ico_all ico_love"><em></em></a>
                    </div>
                    <div class="intro_pro">Lorem Ipsum is simply dummy text of the printing and typesetting industr</div>
                    <div class="sale_off">                            
                        <div class="time_count">
                            <span class="ico_all icon_time"><em></em></span>
                            <span class="txt">12d:5h:11m:34s</span>
                        </div>                            
                        <div class="percent_promo">
                            <span class="ico_all icon_percent"><em></em></span>
                            <span class="txt">Tiết kiệm <span class="font25">50</span><sup>%</sup></span>
                        </div>
                    </div>
                </div>
                <div class="box_vote">
                    <span class="ico_all icon_eyesCus"><em></em></span><label>Little chef</label>
                    <span class="like_unlike">
                        <a href="javascript:;" class="ico_all icon_like"><em></em></a>
                        <a href="javascript:;" class="ico_all icon_like"><em></em></a>
                        <a href="javascript:;" class="ico_all icon_like"><em></em></a>
                        <a href="javascript:;" class="ico_all icon_like"><em></em></a>
                        <a href="javascript:;" class="ico_all icon_unLike"><em></em></a>
                    </span>
                </div>
            </div>
        </div>
    </div>
</div>